Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Entity Analytics] Use docLinks service for documentation links #172172

Merged
merged 3 commits into from
Dec 2, 2023

Conversation

hop-dev
Copy link
Contributor

@hop-dev hop-dev commented Nov 29, 2023

Summary

Using the docLinks service means documentation links will always point to the correct version of the docs for the current Kibana version, not just the latest docs.

@hop-dev hop-dev added release_note:skip Skip the PR/issue when compiling release notes Team:Entity Analytics Security Entity Analytics Team labels Nov 29, 2023
@hop-dev hop-dev self-assigned this Nov 29, 2023
@hop-dev hop-dev requested review from a team as code owners November 29, 2023 14:10
import { LEARN_MORE } from '../../../../overview/components/entity_analytics/risk_score/translations';
import { useKibana } from '../../../../common/lib/kibana';

const useLearnMoreLinkForEntity = (riskScoreEntity?: RiskScoreEntity) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessarily a suggestion, more of a question:

Do you think there would be value in adding a test case for this, now that we're using more dynamic links instead of them just being hardcoded? I assume it would involve mocking the docLinks service, so not sure how much value we'd get, but thought I'd ask!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did debate testing it, but I concluded the tests would be too tied to the implementation to give much value.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me!

Copy link
Contributor

@jaredburgettelastic jaredburgettelastic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to update the URL's to include the domain and base path, unless it's just a local limitation on my side!

packages/kbn-doc-links/src/get_doc_links.ts Outdated Show resolved Hide resolved
@hop-dev
Copy link
Contributor Author

hop-dev commented Nov 30, 2023

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
lists 148.4KB 148.5KB +166.0B
securitySolution 12.9MB 12.9MB +142.0B
total +308.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
core 374.5KB 374.7KB +166.0B
securitySolution 65.8KB 65.5KB -372.0B
total -206.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @hop-dev

@hop-dev hop-dev enabled auto-merge (squash) December 1, 2023 20:40
Copy link
Contributor

@lcawl lcawl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doc link service additions LGTM

Copy link
Contributor

@jaredburgettelastic jaredburgettelastic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Validated that the changes requested were made, looks great!

@hop-dev hop-dev merged commit f08f40a into elastic:main Dec 2, 2023
30 checks passed
@kibanamachine kibanamachine added v8.12.0 backport:skip This commit does not require backporting labels Dec 2, 2023
@hop-dev hop-dev deleted the entity-analytics-doc-links branch December 4, 2023 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting EA Sprint 2 (2023.11.21 - 2023.12.5) release_note:skip Skip the PR/issue when compiling release notes Team:Entity Analytics Security Entity Analytics Team v8.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants